package zhr.chapter8;

public class Example8_2 {
    public static void main(String[] args) {
        Gen<String> g;
        g = new Gen<String>("helloworld", 20);
        g.showRuntimeType();
        String s = g.getObj();
        System.out.println("s=" + s);
        Gen<Integer> g1 = new Gen<Integer>(21, 20);
        g1.showRuntimeType();
        int a = g1.getObj();
        System.out.println("a=" + a);
        g1.setObj(31);
        a = g1.getObj();
        System.out.println("a=" + a);
    }
}
